<?php
$sn  = empty($_POST['sn']) ? 0 : trim($_POST['sn']);
if(empty($sn)){
	exit('参数丢失');
}
$oOrder = new Order();
$orderinfo = $oOrder->get_order_by_sn($sn, '*');

$errmsg = '';
if($orderinfo['state'] <= 0){
	$errmsg = '订单还未确认或已取消';
}elseif($orderinfo['delivery_state'] < 2){
	$errmsg = '当前订单还未发货';
}
if($errmsg != ''){
	ajax_msg('wanring', $errmsg, $callback = 'receive_callback', $synjs = '', $ttl = 2000);
}

$r = $oOrder->acts($sn, 'receive');
ajax_msg($r['result'], $msg, $callback = 'receive_callback', $synjs = '', $ttl = 2000);

?>